import request from '@/api/request'

/**
 * 活动列表
 * @returns
 */
export function findAllRecommends() {
  return request({
    url: '/lejuAdmin/homeRecommend/findAllRecommends'
  })
}

/**
 * 删除活动列表
 * @param {*} id
 * @returns
 */
export function delRecommend(id) {
  return request({
    url: `/lejuAdmin/homeRecommend/delRecommend/${id}`,
    method: 'delete'
  })
}

/**
 * 编辑限时活动
 * @returns
 */
export function updateRecommend() {
  return request({
    url: '/lejuAdmin/homeRecommend/updateRecommend',
    method: 'post'
  })
}

/**
 * 获取活动明细
 * @param {*} id
 * @returns
 */
export function homeRecommend(id) {
  return request({
    url: `/lejuAdmin/homeRecommend/${id}`,
    method: 'get'
  })
}

/**
 * 添加限时活动
 * @param {*} data
 * @returns
 */
export function addRecommend(data) {
  return request({
    url: `/lejuAdmin/homeRecommend/addRecommend`,
    method: 'post',
    data
  })
}
